# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Dataflow.V1b3.Model.DataSamplingReport do
  @moduledoc """
  Contains per-worker telemetry about the data sampling feature.

  ## Attributes

  *   `bytesWrittenDelta` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of bytes written to file from previous report.
  *   `elementsSampledBytes` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of bytes sampled from previous report.
  *   `elementsSampledCount` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of number of elements sampled from previous report.
  *   `exceptionsSampledCount` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of number of samples taken from user code exceptions from previous report.
  *   `pcollectionsSampledCount` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of number of PCollections sampled from previous report.
  *   `persistenceErrorsCount` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of errors counts from persisting the samples from previous report.
  *   `translationErrorsCount` (*type:* `String.t`, *default:* `nil`) - Optional. Delta of errors counts from retrieving, or translating the samples from previous report.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bytesWrittenDelta => String.t() | nil,
          :elementsSampledBytes => String.t() | nil,
          :elementsSampledCount => String.t() | nil,
          :exceptionsSampledCount => String.t() | nil,
          :pcollectionsSampledCount => String.t() | nil,
          :persistenceErrorsCount => String.t() | nil,
          :translationErrorsCount => String.t() | nil
        }

  field(:bytesWrittenDelta)
  field(:elementsSampledBytes)
  field(:elementsSampledCount)
  field(:exceptionsSampledCount)
  field(:pcollectionsSampledCount)
  field(:persistenceErrorsCount)
  field(:translationErrorsCount)
end

defimpl Poison.Decoder, for: GoogleApi.Dataflow.V1b3.Model.DataSamplingReport do
  def decode(value, options) do
    GoogleApi.Dataflow.V1b3.Model.DataSamplingReport.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Dataflow.V1b3.Model.DataSamplingReport do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
